package com.timmy.common;

/**
 * upms系统接口结果常量枚举类
 * created by zx on 2017.10.08
 */
public enum UpmsResultConstant {
    //失败
    FAILED(0, "failed"),
    //成功
    SUCCESS(1, "success"),
    //不合法的长度
    INVALID_LENGTH(10001, "Invalid length"),
    //用户名不能为空
    EMPTY_USERNAME(10101, "Username cannot be empty"),
    //密码不能为空
    EMPTY_PASSWORD(10102, "Password cannot be empty"),
    //账号不能为空
    INVALID_USERNAME(10103, "Account does not exist"),
    //密码错误
    INVALID_PASSWORD(10104, "Password error"),
    //不可用的账号
    INVALID_ACCOUNT(10105, "Invalid account");

    public int code;
    public String message;

    UpmsResultConstant(int code,String message){
        this.code = code;
        this.message = message;
    }

    UpmsResultConstant() {
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "UpmsResultConstant{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }



}
